home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Telnet / NCSA / tn3270 2.3d26 source / SPPC / sppcinterface.h < prev    next >
Text File  |  1991-05-28  |  3KB  |  75 lines

  1. /* Definitions for interface to .SPPC driver */
  2.  
  3. #define MSGNUM        24        /* number of outstanding messages allowed */
  4. #define CLIENTNUM    8        /* number of simultaneous clients */
  5. #define NAMELENGTH    32        /* significant chars. in client name */
  6. #define MSGLENGTH    128        /* maximum length of message */
  7.  
  8. /* Pointer to parmrec structure is passed in the first 4 bytes
  9.    of the csParam field.                                        */
  10. typedef struct {
  11.     unsigned char * name;        /* register or lookup name */
  12.     Handle msg;                    /* handle to message storage*/    
  13.     unsigned long * msgid;        /* pointer for returned msg id */
  14.     unsigned long replyid;        /* reply id to send or get */
  15.     unsigned long * replyidptr;    /* reply id returned by get */
  16.     unsigned short msglen;        /* message length */
  17.     unsigned short * msglenptr;    /* pointer to message length */
  18.     short * refptr;                /* pointer for returned refnum */
  19.     short refnum;                /* caller's refnum */
  20.     short refnum2;                /* destination refnum for send */
  21.     } parmrec;
  22.  
  23. /* Control call csCode values */
  24.  
  25. /* Register: required parameters are "name" and "refptr".  The
  26.    specified name is registered, and a new reference number returned
  27.    via refptr */
  28. #define SPPCreg        1
  29.  
  30. /* Deregister: required parameter is "refnum".  The application
  31.    assigned "refnum" is deregistered, and any pending messages for
  32.    it deleted. */
  33. #define SPPCdereg    2
  34.  
  35. /* Lookup: required parameters are "name" and "refptr".  If an
  36.    application with the specified name is registered, its reference
  37.    number is returned via "refptr". */
  38. #define SPPClookup    3
  39.  
  40. /* Send: required parameters are "refnum", "refnum2", "msg", "msglen",
  41.    and "msgid". "replyid" is not required, but must be set to zero
  42.    when not being used.  "Msg" is a handle to a message which is sent
  43.    from the application with "refnum" to the application with "refnum2".  
  44.    "Msglen" is the length of the message, and "msgid" is a pointer
  45.    for storing a unqiue identifier assigned to the message.  "replyid"
  46.    may be used to optionally indicate this message is a reply to a
  47.    specific previous message. */
  48. #define SPPCsend    4
  49.  
  50. /* Get: required parameters are "refnum", "refptr", "msg", "msglenptr",
  51.    "msgid", and "replyidptr".  "replyid" is not required, but must be set to zero
  52.    when not being used.  If a message is queued for the application with
  53.    "refnum", "refptr" is set to indicate the sending application, and
  54.    the message is stored in the storage provided by the "msg" handle.
  55.    "Msglenptr" is used to store the length of the message, and "msgid"
  56.    is a pointer for storing a unique identifier assigned to the message.
  57.    "Replyidptr" is used to store the reply id sent with this message. 
  58.    If "replyid" is non-zero, "Get" will return only those messages
  59.    sent with a matching reply id.
  60.    Note that the application calling "Get" must allocate storage
  61.    for receiving the message. */
  62. #define SPPCget        5
  63.  
  64. /* Clear: required parameter is "refnum".  Any queued messages for
  65.    the application with "refnum" are deleted. The "deregister"
  66.    function invokes "clear" when deleting a client. */
  67. #define SPPCclear    6
  68.  
  69. /* Delete Message: required parameter is "msgid".  "Msgid" points
  70.    to the unique identifier for a message to be deleted.  A message
  71.    can be deleted if it was sent, but not yet received by the
  72.    target application.  */
  73. #define SPPCdelmsg    7
  74.     
  75.